package com.ulic.customerManApplication.studentmodule.bo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ulic.customerManApplication.commonmodule.bo.Organization;
import com.ulic.customerManApplication.journeylovemodule.bo.JourneyOfLoveActivity;
import com.ulic.customerManApplication.usermodule.bo.User;

@Entity
@Table(name="T_GYW_SUB_STUDENT")
@SequenceGenerator(name="sub_student_seq",sequenceName="S_GYW_SUB_STUDENT_ID")
public class SubStudent implements Serializable{

	/**
	 * 学生信息
	 */
	private static final long serialVersionUID = 1L;
	private int sub_id;//编号
	private String sub_name;//学生姓名
    private String sub_gender;//学生性别
    private String sub_school;//学校
    private Date sub_createDate;//创建日期
    
    private User sub_user;//创建者
    
    private String subCompany;//所属分公司
    
    private String subCity;//所属中支
    
	private String subComName;//分公司名称
	
	private String subCityName;//中支名称
    
    private JourneyOfLoveActivity sub_journeyOfLoveActivity;
    
    @ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="JOURNEYLOVE_ID")
    public JourneyOfLoveActivity getSub_journeyOfLoveActivity() {
    	return sub_journeyOfLoveActivity;
    }
    public void setSub_journeyOfLoveActivity(
    		JourneyOfLoveActivity subJourneyOfLoveActivity) {
    	sub_journeyOfLoveActivity = subJourneyOfLoveActivity;
    }
	 
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="sub_student_seq")
	public int getSub_id() {
		return sub_id;
	}
	public void setSub_id(int subId) {
		sub_id = subId;
	}
	public String getSub_name() {
		return sub_name;
	}
	public void setSub_name(String subName) {
		sub_name = subName;
	}
	public String getSub_gender() {
		return sub_gender;
	}
	public void setSub_gender(String subGender) {
		sub_gender = subGender;
	}
	public String getSub_school() {
		return sub_school;
	}
	public void setSub_school(String subSchool) {
		sub_school = subSchool;
	}
	public Date getSub_createDate() {
		return sub_createDate;
	}
	public void setSub_createDate(Date subCreateDate) {
		sub_createDate = subCreateDate;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="UM_USER_ID")
    public User getSub_user() {
		return sub_user;
	}
	public void setSub_user(User subUser) {
		sub_user = subUser;
	}
	public String getSubCompany() {
		return subCompany;
	}
	public void setSubCompany(String subCompany) {
		this.subCompany = subCompany;
	}
	public String getSubCity() {
		return subCity;
	}
	public void setSubCity(String subCity) {
		this.subCity = subCity;
	}
	public String getSubComName() {
		return subComName;
	}
	public void setSubComName(String subComName) {
		this.subComName = subComName;
	}
	public String getSubCityName() {
		return subCityName;
	}
	public void setSubCityName(String subCityName) {
		this.subCityName = subCityName;
	}
	
}
